package com.movie.ticket.sale.movieinterface.aheadcontroller;

import com.movie.ticket.sale.movieinterface.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author： Micsal
 * @create-time： 2020.12.04 15:48
 * @version： 1.0
 * @description： 图片识别，辅助工具类
 */
@Api(tags = "图片识别(OCRUtil)，属于author服务",description = "校验图片，获取信息")
@RequestMapping("/ocr")
@RestController
public class OCRUtil {

    @ApiOperation("识别图片，获取文字信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "imgPath",value = "图片路径",dataType="string",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,response = Result.class,message = "成功,返回map，存放信息名和信息值"),
            @ApiResponse(code=426,response = Result.class,message = "失败，信息存result.message中")
    })
    @GetMapping("/recognizeImg")
    public static Result recognizeImg(String imgPath){
        return null;
    }

}
